package com.gopay.common.domain.cust;

import com.gopay.common.domain.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
import java.util.Date;

/**
 * @author lij-jiang
 * @ClassName: CustSettledConfigInfo.java
 * @Description: 商户入驻配置信息表
 * @date 2017年07月21日 15:29
 */
@Entity
@Table(name = "CUST_SETTLED_CONFIG_INFO")
public class CustSettledConfigInfo extends BaseEntity {
    private static final long serialVersionUID = 4197302244716798519L;

    private Long id;
    private String custId;
    private String reqMesId;
    private String businessType;
    private String businessValue;
    private String status;
    private String merchantCode;
    private String errorMsg;
    private Date createdTs;
    private String createOperId;
    private String lastUpdOperId;
    private Date lastUpdTs;
    private int version;
    private String channelType;

    @Id
    @Column(name = "ID")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "CUST_SETTLED_CONFIG_INFO_SEQ")
    @SequenceGenerator(name = "CUST_SETTLED_CONFIG_INFO_SEQ", allocationSize = 1, initialValue = 1, sequenceName = "CUST_SETTLED_CONFIG_INFO_SEQ")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "CUST_ID", nullable = false, length = 10)
    public String getCustId() {
        return custId;
    }

    public void setCustId(String custId) {
        this.custId = custId;
    }

    @Column(name = "REQ_MES_ID", length = 32)
    public String getReqMesId() {
        return reqMesId;
    }

    public void setReqMesId(String reqMesId) {
        this.reqMesId = reqMesId;
    }

    @Column(name = "BUSINESS_TYPE", nullable = false, length = 2)
    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    @Column(name = "BUSINESS_VALUE", nullable = false, length = 200)
    public String getBusinessValue() {
        return businessValue;
    }

    public void setBusinessValue(String businessValue) {
        this.businessValue = businessValue;
    }

    @Column(name = "STATUS", length = 2)
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Column(name = "MERCHANT_CODE", nullable = false, length = 32)
    public String getMerchantCode() {
        return merchantCode;
    }

    public void setMerchantCode(String merchantCode) {
        this.merchantCode = merchantCode;
    }

    @Column(name = "ERROR_MSG", length = 256)
    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    @Column(name = "CREATED_TS")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    @Column(name = "CREATE_OPER_ID", length = 10)
    public String getCreateOperId() {
        return createOperId;
    }

    public void setCreateOperId(String createOperId) {
        this.createOperId = createOperId;
    }

    @Column(name = "LAST_UPD_OPER_ID", length = 10)
    public String getLastUpdOperId() {
        return lastUpdOperId;
    }

    public void setLastUpdOperId(String lastUpdOperId) {
        this.lastUpdOperId = lastUpdOperId;
    }

    @Column(name = "LAST_UPD_TS")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastUpdTs() {
        return lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

    @Version
    @Column(name = "VERSION", nullable = false, precision = 22, scale = 0)
    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    @Column(name = "CHANNEL_TYPE", length = 10)
    public String getChannelType() {
        return channelType;
    }

    public void setChannelType(String channelType) {
        this.channelType = channelType;
    }
}
